<?php 
$this->_toolbar = array(
		'title'		=>	Shop::t('Category'),
		'buttons'	=>	array(
			CHtml::link(Shop::t('Create a new Category'), array('category/create'), array("class"=>"search-button button-s")),
		)
);

if(!$model){
	$model=new Category('search');
		$model->unsetAttributes();
		if(isset($_GET['Category']))
			$model->attributes=$_GET['Category'];
}
$this->widget('ext.widgets.iGridView', array(
	'id'=>'category-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		array(
			'name'	=>	'title',
			'type'	=>	'raw',
			'value'	=>	'CHtml::link(CHtml::encode($data->title), array("/shop/category/update","id"=>$data->category_id))'
		),
		array(
			'class'=>'CButtonColumn', 
			'viewButtonUrl' => 'Yii::app()->createUrl("/shop/category/view",
			array("id" => $data->category_id))',
			'updateButtonUrl' => 'Yii::app()->createUrl("/shop/category/update",
			array("id" => $data->category_id))',
			'deleteButtonUrl' => 'Yii::app()->createUrl("/shop/category/delete",
			array("id" => $data->category_id))',
		),
	),
)); 


?>
